$(function(){
    alert("---?>"+contextName)
    alert("---->"+location.href)
    var list = tools.getToolsList();
    if(list){
        var content=$("#content");
        for(var i in list){
            var bg="";
            if(list[i].ico){
                bg = "style='background-image:url("+list[i].ico+");'";
            }
            var item=$("<div class='list-item' "+bg+"></div>").appendTo(content);
            var desc=$("<div class='desc'></div>").appendTo(item);
            desc.text(list[i].name);
            item.data("item",list[i]);
        }
    }

    $(document).on("click","div.list-item",function(){
        var item = $(this).data("item");
        alert(item.url);
        location.href=item.url;
    });
})